<div class="page_title">
    <span class="title_icon"><span class="blocks_images"></span></span>
    <h3>MEDICAMENTOS</h3>
</div>
<div id="content">
    <div class="grid_container">
        <div class="grid_12">
            <div class="widget_wrap">
                <div class="widget_top">
                    <span class="h_icon blocks_images"></span>
                    <h6>Listado de los Medicamentos</h6>
                </div>
                <div class="widget_content">
                    <table class="display data_tbl">
                        <thead>
                            <tr>
                                <th>Id</th>
                                <th>Presentacion</th>
                                <th>Medidas</th>
                                <th>Nombre</th>
                                <th>Proporcion</th>
                                <th>Clasificacion</th>
                                <th>Acciones</th>
                            </tr>
                        </thead>
                        <tbody>

                            <?php $i=1; foreach ($medicamentos as $med):
                            ?>
                                <tr class="gradeA">
                                    <td><?php echo $i; $i++;?></td>
                                    <td><?php echo $med['Presentacionesmedicamento']['nombre']. ' ' .$med['Presentacionesmedicamento']['ap_materno']; ?></td>
                                    <td><?php echo $med['Medidasmedicamento']['nombre']; ?></td>
                                    <td><?php echo $med['Medicamento']['nombre']; ?></td>
                                    <td><?php echo $med['Medicamento']['porporcion']; ?></td>
                                    <td><?php echo $med['Medicamento']['clasificacion']; ?></td>
                                    <td>
                                        <?php echo $this->Html->link($this->Html->image("iconos/edit.png", array("alt"=>'edit', 'title'=>'EDITAR')), array('action'=>'editar', $med['Medicamento']['id']), array('escape'=>false));?>

                                        <?php echo $this->Html->link($this->Html->image("iconos/cancel.png", array("alt"=>'delete', 'title'=>'ELIMINAR')), array('action'=>'eliminar', $med['Medicamento']['id']), array('escape'=>false),'esta seguro de eliminar '.$med['Medicamento']['nombre']);?>      

                                        <?php echo $this->Html->image("iconos/precios2.png",array('title'=>'ADD PRECIOS', 'url'=>array('action'=>'precios', $med['Medicamento']['id'])));?>

                                        <?php echo $this->Html->image("iconos/compras.png",array('title'=>'COMPRAS', 'url'=>array('action'=>'comprass', $med['Medicamento']['id'])));?>
                                    </td>
                                </tr>
                            <?php endforeach; ?>
                        </tbody>                        
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>

